#include <iostream>
#include <cstring>
using namespace std;

void bubblesort(char *num_little)
{
    int len = strlen(num_little);
    for (int i = 0; i < len; i++)
    {
        for (int j = 0; j < len - 1 - i; j++)
        {
            if (num_little[j] > num_little[j + 1])
            {
                char temp = num_little[j];
                num_little[j] = num_little[j + 1];
                num_little[j + 1] = temp;
            }
        }
    }
}

int main()
{
    char original_str[101] = {};
    fgets(original_str, 101, stdin);
    char first_char = original_str[0];
    // 移除换行符
    original_str[strcspn(original_str, "\n")] = '\0';

    char larger_nums[101] = {};
    char little_nums[101] = {};

    int len = strlen(original_str);
    int k = 0;
    int j = 0;
    for (int i = 1; i < len; i++)
    {
        if (original_str[i] > first_char)
        {
            larger_nums[k] = original_str[i];
            k++;
        }
        else
        {
            little_nums[j] = original_str[i];
            j++;
        }
    }

    bubblesort(little_nums);

    cout << larger_nums;
    cout << first_char;
    cout << little_nums;

    return 0;
}